package com.cn.ZhiKeDianShang.util.Netdialog.Dialog;

import android.content.Context;


import com.cn.ZhiKeDianShang.util.Netdialog.Dialog.config.ConfigBean;
import com.cn.ZhiKeDianShang.util.Netdialog.Dialog.config.DefaultConfig;
import com.cn.ZhiKeDianShang.util.Netdialog.Dialog.interfaces.Assignable;

/**
 * Created by Administrator on 2016/10/9 0009.
 */
public class DialogAssigner implements Assignable {

    private static DialogAssigner instance;

    private DialogAssigner() {

    }

    public static DialogAssigner getInstance() {
        if (instance == null) {
            instance = new DialogAssigner();
        }
        return instance;
    }

    @Override
    public ConfigBean assignLoading(Context context, CharSequence msg, boolean cancelable, boolean outsideTouchable) {
        ConfigBean bean = new ConfigBean();
        bean.context = context;
        bean.msg = msg;
        bean.type = DefaultConfig.TYPE_LOADING;

        bean.cancelable = cancelable;
        bean.outsideTouchable = outsideTouchable;

        return bean;
    }


}
